﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script type="text/javascript">
        onload = function (){
            btn.onclick = function(){
               var text1 = "\r\n--本文来自心扉文档";
                if (document.getElementById("ck").checked == true) {
                    window.clipboardData.setData("text", document.getElementById("txt").value + text1);
                    alert("复制成功");
                };
            };
        };
    </script>
</head>
<body>
	<form>
    <input type="checkbox"  id="ck" />
    <input type="text" style="width:70%" id="txt"/>
    <input type="button" id="btn" value="点击复制"/>
	</form>
</body>
</html>
